package com.yy.controller;

import com.yy.pojo.Role;
import com.yy.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: yy
 * @Date 2021/11/14 12:52
 */
@RestController
public class RoleController {
    @Autowired
    RoleService roleService;

    /**
     * 查看
     */
    @GetMapping("/getRoleList")
    public List<Role> getRoleList(){
        List<Role> roleList = roleService.getRoleList();
        for (Role role : roleList){
            System.out.println(role);
        }
        return roleList;
    }

}
